home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / MPW Oberon 2.1168 / OInterfaces / OSAGeneric.mod < prev    next >
Encoding:
Text File  |  1995-08-07  |  3.5 KB  |  90 lines  |  [TEXT/MPS ]

  1. (*
  2.      File:        OSAGeneric.mod
  3.  
  4.      Contains:    AppleScript Generic Components.Component Interfaces.
  5.  
  6.      Version:    Technology:    AppleScript 1.1
  7.                  Package:    Universal Interfaces 2.0 in “MPW Latest” on ETO #17
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs.applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. *)
  19.  
  20. (*$TAGS-*)
  21. (*$CALLING PASCAL*)
  22. MODULE OSAGeneric;
  23.  
  24. IMPORT SYSTEM, Types, AppleEvents, Components, OSA;
  25.  
  26. (* $PUSH*)
  27. (* $ALIGN MAC68K*)
  28. (* $LibExport+*)
  29. (*     NOTE*:    This interface defines a "generic scripting component."
  30.             The Generic Scripting Component allows automatic dispatch to a
  31.             specific scripting component that conforms to the OSA interface.
  32.             This component supports OSA, by calling AppleScript or some other 
  33.             scripting component.  Additionally it provides access to the default
  34.             and the user-prefered scripting component.
  35. *)
  36.  
  37. CONST
  38. (* Component version this header file describes *)
  39.     kGenericComponentVersion*    = $0100;
  40.  
  41.     kGSSSelectGetDefaultScriptingComponent* = $1001;
  42.     kGSSSelectSetDefaultScriptingComponent* = $1002;
  43.     kGSSSelectGetScriptingComponent* = $1003;
  44.     kGSSSelectGetScriptingComponentFromStored* = $1004;
  45.     kGSSSelectGenericToRealID*    = $1005;
  46.     kGSSSelectRealToGenericID*    = $1006;
  47.     kGSSSelectOutOfRange*        = $1007;
  48.  
  49.     
  50. TYPE
  51.     ScriptingComponentSelector* = Types.OSType;
  52.  
  53.     GenericID* = OSA.OSAID;
  54.  
  55. (* get and set the default scripting component *)
  56.  
  57. PROCEDURE OSAGetDefaultScriptingComponent*(genericScriptingComponent: Components.ComponentInstance; VAR scriptingSubType: ScriptingComponentSelector): OSA.OSAError;
  58.     (*$IF NOT GENERATINGCFM*)
  59.     INLINE PASCAL $2F3C, 4, $1001, $7000, $A82A;
  60.     (*$END*)
  61. PROCEDURE OSASetDefaultScriptingComponent*(genericScriptingComponent: Components.ComponentInstance; scriptingSubType: ScriptingComponentSelector): OSA.OSAError;
  62.     (*$IF NOT GENERATINGCFM*)
  63.     INLINE PASCAL $2F3C, 4, $1002, $7000, $A82A;
  64.     (*$END*)
  65. (* get a scripting component instance from its subtype code *)
  66. PROCEDURE OSAGetScriptingComponent*(genericScriptingComponent: Components.ComponentInstance; scriptingSubType: ScriptingComponentSelector; VAR scriptingInstance: Components.ComponentInstance): OSA.OSAError;
  67.     (*$IF NOT GENERATINGCFM*)
  68.     INLINE PASCAL $2F3C, 8, $1003, $7000, $A82A;
  69.     (*$END*)
  70. (* get a scripting component selector (subType) from a stored script *)
  71. PROCEDURE OSAGetScriptingComponentFromStored*(genericScriptingComponent: Components.ComponentInstance; (*CONST*)VAR scriptData: AppleEvents.AEDesc; VAR scriptingSubType: ScriptingComponentSelector): OSA.OSAError;
  72.     (*$IF NOT GENERATINGCFM*)
  73.     INLINE PASCAL $2F3C, 8, $1004, $7000, $A82A;
  74.     (*$END*)
  75. (* get a real component instance and script id from a generic id *)
  76. PROCEDURE OSAGenericToRealID*(genericScriptingComponent: Components.ComponentInstance; VAR theScriptID: OSA.OSAID; VAR theExactComponent: Components.ComponentInstance): OSA.OSAError;
  77.     (*$IF NOT GENERATINGCFM*)
  78.     INLINE PASCAL $2F3C, 8, $1005, $7000, $A82A;
  79.     (*$END*)
  80. (* get a generic id from a real component instance and script id *)
  81. PROCEDURE OSARealToGenericID*(genericScriptingComponent: Components.ComponentInstance; VAR theScriptID: OSA.OSAID; theExactComponent: Components.ComponentInstance): OSA.OSAError;
  82.     (*$IF NOT GENERATINGCFM*)
  83.     INLINE PASCAL $2F3C, 8, $1006, $7000, $A82A;
  84.     (*$END*)
  85.  
  86. (* $ALIGN RESET*)
  87. (* $POP*)
  88.  
  89.  END OSAGeneric.
  90.